/*
    简单工厂的实现部分
*/

#include "reqProcessorFactory.h"

requestProcessor* reqProcessorFactory::produceHttpProcessor(llhttp_method method) {
    // 生产所需的Http请求处理
    switch (method) {
        case llhttp_method::HTTP_GET:
            return new getProcessor();
        case llhttp_method::HTTP_POST:
            return new postProcesssor();           
        default:
            return nullptr;
    }
}